package com.xmy.cultivate.service.impl;

import com.xmy.cultivate.entity.PermissionSchoolTeacher;
import com.xmy.cultivate.mapper.PermissionSchoolTeacherMapper;
import com.xmy.cultivate.service.IPermissionSchoolTeacherService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 老师查看校区的功能权限【例：某个功能需要设置对应老师可以看哪些校区的数据】 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2025-03-26
 */
@Service
public class PermissionSchoolTeacherServiceImpl extends ServiceImpl<PermissionSchoolTeacherMapper, PermissionSchoolTeacher> implements IPermissionSchoolTeacherService {

    @Autowired
    PermissionSchoolTeacherMapper permissionSchoolTeacherMapper;

    @Override
    public List<String> getSchoolIdByTeacherId(String teacherId) {
        return permissionSchoolTeacherMapper.getSchoolIdByTeacherId(teacherId);
    }

    /**
     * 获取运营主管校区id
     * @param teacherId
     * @return
     */
    @Override
    public List<String> getManagerByTeacherId(String teacherId) {
        return permissionSchoolTeacherMapper.getManagerByTeacherId(teacherId);
    }


    @Override
    public List<PermissionSchoolTeacher> getPermissionSchoolTeacherByTeacherId(String teacherId) {
        return permissionSchoolTeacherMapper.getPermissionSchoolTeacherByTeacherId(teacherId);
    }
}
